import { ref } from 'vue'
import { type RouteLocationNormalizedLoaded } from 'vue-router'

const fromRoute = ref<RouteLocationNormalizedLoaded>()
export function useFromRoute() {
  const setFromRoute = (route: RouteLocationNormalizedLoaded) => {
    fromRoute.value = route
  }

  return {
    fromRoute,
    setFromRoute,
  }
}
